/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

/**
 * @author lailiaidi
 * This class is to bundling all the Email data for SMTP message
 */
public class MailEnvelope {

    //MAIL HEADER
    private String obStrSender;
    private String obStrRecipient;
    private String obStrSubject;
    private MailBody obMailData;
    private MailMIMEHeader obMailMIME;

    public void setSender(String obStrSender) {
        if (!obStrSender.contains("<")) {
            obStrSender = "<" + obStrSender;
        }
        if (!obStrSender.contains(">")) {
            obStrSender = obStrSender + ">";
        }
        this.obStrSender = obStrSender;
    }

    public void setRecipient(String obStrRecipient) {
        if (!obStrRecipient.contains("<")) {
            obStrRecipient = "<" + obStrRecipient;
        }
        if (!obStrRecipient.contains(">")) {
            obStrRecipient = obStrRecipient + ">";
        }
        this.obStrRecipient = obStrRecipient;
    }

    public void setMailData(MailBody obMailData) {
        this.obMailData = obMailData;
    }

    public void setMailMIME(MailMIMEHeader obMailMIME) {
        this.obMailMIME = obMailMIME;
    }

    public String getSender() {
        return obStrSender;
    }

    public String getRecipient() {
        return obStrRecipient;
    }

    public MailBody getMailData() {
        return obMailData;
    }

    public MailMIMEHeader getMailMIME() {
        return obMailMIME;
    }
}
